import api from './index'; // 引入 axios 实例

export const uploadFile = (file) => {
    const formData = new FormData();
    formData.append('file', file);

    return api.post('/cosmic/uploadFile', formData, {
        headers: {
            'Content-Type': 'multipart/form-data',
        },
    });
};